Exemple #1
0
        public OperationEntity Update(UserEntity UserEntity, Guid OperationId, OperationEntity OperationEntity)
        {
            Operation Operation = context.Operations.Where(l => l.Id == OperationId).FirstOrDefault();

            OperationEntity.ToModel(Operation);
            context.SaveChanges();
            return(OperationEntity);
        }
Exemple #2
0
        public OperationEntity Create(UserEntity UserEntity, OperationEntity OperationEntity)
        {
            OperationEntity.Id = Guid.NewGuid();
            Operation Operation = OperationEntity.ToModel();

            context.Operations.Add(Operation);
            context.SaveChanges();
            return(OperationEntity);
        }