Example #1
0
        public DataTransferObject <TDTO> Update(TDTO dtoObject)
        {
            TEntity entity = ConvertToEntity(dtoObject);

            Repository.Update(entity);
            var response = new DataTransferObject <TDTO>(dtoObject);

            return(response);
        }
Example #2
0
        public DataTransferObject <TDTO> FindById(TKey id)
        {
            var response = new DataTransferObject <TDTO>(ConvertToDto(Repository.GetFirst(tEntity => tEntity.Id.Equals(id))));

            return(response);
        }