HBM.GeneralManagement.BedTypeDAO.Delete C# (CSharp) Method

Delete() public method

public Delete ( BedType bedType ) : bool
bedType BedType
return bool
        public bool Delete(BedType bedType)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_BedTypeDelete");

            db.AddInParameter(command, "@BedTypeId", DbType.Int32, bedType.BedTypeId);

            db.ExecuteNonQuery(command);

            return true;
        }