public static void UpdatePostCateGory(this PostCateGory p1, PostCateGoryViewModel p2) { p1.id = p2.id; p1.name = p2.name; p1.alias = p2.alias; p1.displayoder = p2.displayoder; p1.metaDesciption = p2.metaDesciption; p1.image = p2.image; p1.metakeyword = p2.metakeyword; p1.status = p2.status; p1.parentid = p2.parentid; p1.homeflag = p2.homeflag; p1.createdat = p2.createdat; p1.createby = p2.createby; p1.updatedat = p2.updatedat; p1.updateby = p2.updateby; }
public HttpResponseMessage Create(HttpResponseMessage request, PostCateGoryViewModel value) { HttpResponseMessage response = null; if (ModelState.IsValid) { } else { PostCateGory key = new PostCateGory(); key.UpdatePostCateGory(value); _iPostCateGoryService.Add(key); _iPostCateGoryService.SaveChange(); response = Request.CreateResponse(HttpStatusCode.Created, value); } return(response); }
public void Delete(PostCateGory entity) { throw new NotImplementedException(); }
public void Update(PostCateGory entity) { _postCategorrepository.Update(entity); }
public void Add(PostCateGory entity) { _postCategorrepository.Add(entity); }