Beispiel #1
0
        //DELETE
        public static string DeleteUnit(int name)
        {
            string latestSaveCode = string.Empty;

            try
            {
                using (var db = new MarkomApplicationDBEntities())
                {
                    ObjectParameter returnId = new ObjectParameter("IdNumber", typeof(string)); //Create Object parameter to receive a output value.It will behave like output parameter
                    db.spUnitDelete(name, returnId);                                            //calling our entity imported function "Bangalore" is our input parameter, returnId is a output parameter, it will receive the output value
                    latestSaveCode = (String)returnId.Value;
                }
            }
            catch (Exception ex)
            {
                Message = ex.Message;
            }

            return(latestSaveCode);
        }