Example #1
0
        public string Update(int id, string name, string description)
        {
            var    userid = User.Identity.GetUserId();
            string msg;

            try
            {
                BiteService model = service.GetById(id);
                model.Name        = name;
                model.Description = description;
                model.ChangedBy   = userid;
                service.Update(model);
                msg = "Saved Successfully";
            }
            catch (Exception ex)
            {
                msg = "Error occured:" + ex.Message;
            }
            return(msg);
        }
 public void Update(BiteService entity)
 {
     repository.Update(entity);
 }
 public void Create(BiteService entity)
 {
     entity.DateCreated = DateTime.Now;
     entity.DateChanged = DateTime.Now;
     repository.Insert(entity);
 }