public static decimal insert(string name, string description, DateTime start, decimal userId) { using (var conn = new db_entities()) { try { conn.SP_PROCESS_INSERT(name, description, DateTime.Now, start, userId);; var process = conn.process.Where(x => x.name.Equals(name) && x.description.Equals(description) && x.user_id == userId).FirstOrDefault(); return(process.id); } catch (Exception e) { throw e; } } }