public Response Create(NotificationStatusParam param)
        {
            Response response = new Response();

            try
            {
                response.Text   = "This entity has been added :" + Environment.NewLine + JsonConverter.JsonConverter.ObjToJson(Processor.Create(param));
                response.Result = true;
            }
            catch
            {
                response.Text   = "Unfortunately something went wrong. Are you sure that the entity you are trying to create doesn't already exist ?";
                response.Result = false;
            }
            return(response);
        }
        public Response Update(long id, NotificationStatusParam param)
        {
            Response response = new Response();

            try
            {
                Processor.Update(id, param);
                response.Text   = "The entity has been updated.";
                response.Result = true;
            }
            catch
            {
                response.Text   = "The command was unable to execute. Are you sure the entity you want to update exists.";
                response.Result = false;
            }
            return(response);
        }
Example #3
0
 public void Update(long id, NotificationStatusParam param)
 {
     Data.Entity.NotificationStatus oldEntity = Dao.Find(id);
     Data.Entity.NotificationStatus newEntity = ParamConverter.Convert(param, oldEntity);
     Dao.Update(newEntity);
 }
Example #4
0
 public NotificationStatusResult Create(NotificationStatusParam param)
 {
     Data.Entity.NotificationStatus entity = ParamConverter.Convert(param, null);
     entity = Dao.Save(entity);
     return(ResultConverter.Convert(entity));
 }
 public void ValidateParameters(NotificationStatusParam param)
 {
     throw new NotImplementedException();
 }