public static Client CreateEntity(DTO.ClientDto model) { if (model == null) { return(null); } var entity = new Client() { ClientId = model.ClientId ?? 0, LastName = model.LastName, FirstName = model.FirstName }; return(entity); }
public static DTO.ClientDto CreateModel(Client entity) { if (entity == null) { return(null); } var model = new DTO.ClientDto() { FirstName = entity.FirstName, LastName = entity.LastName, ClientId = entity.ClientId }; return(model); }