public IResult Update(ClassProperetiesDTO dto) { Repo.Update(Mapper.DeMap(dto)); return(new Result() { Message = ResponseMessageType.None, ResponseStatusType = ResponseStatusType.Successed }); }
public ClassPropereties DeMap(ClassProperetiesDTO dto) { ClassPropereties entity = repo.GetByID(dto.Id); if (entity == null) { return new ClassPropereties() { Price = dto.Price, ClassName = dto.ClassName, Id = dto.Id, } } ; entity.Price = dto.Price; entity.ClassName = dto.ClassName; entity.Id = dto.Id; return(entity); }