//Reject EVENT public static string CloseEv(EventViewModel paramEv) { string latestSaveCode = string.Empty; try { using (var db = new MarkomApplicationDBEntities()) { ObjectParameter returnId = new ObjectParameter("Code", typeof(string)); db.spEventClose( paramEv.id , returnId , paramEv.status , paramEv.closedDate ); latestSaveCode = (String)returnId.Value; } } catch (Exception ex) { Message = ex.Message; } return(latestSaveCode); }