public CameraResultModel Create(CameraResultModel entity)
        {
            entity.CreationDate   = DateTime.Now;
            entity.LastUpdateDate = DateTime.Now;

            return(_nonQueryDataService.Create(entity));
        }
        public MachineModel Create(MachineModel entity)
        {
            entity.CreationDate   = DateTime.Now;
            entity.LastUpdateDate = DateTime.Now;

            return(_nonQueryDataService.Create(entity));
        }
        public TraceabilityLogModel Create(TraceabilityLogModel entity)
        {
            entity.CreationDate   = DateTime.Now;
            entity.LastUpdateDate = DateTime.Now;

            return(_nonQueryDataService.Create(entity));
        }
 public async Task <Registration> Create(Registration entity)
 {
     entity.IsActive  = true;
     entity.CreatedBy = 1;
     entity.CreatedAt = DateTime.Now;
     return(await _nonQueryDataService.Create(entity));
 }
        public PartAssemblyModel Create(PartAssemblyModel entity)
        {
            entity.CreationDate   = DateTime.Now;
            entity.LastUpdateDate = DateTime.Now;

            return(_nonQueryDataService.Create(entity));
        }
        public TighteningRepairModel Create(TighteningRepairModel entity)
        {
            entity.CreationDate   = DateTime.Now;
            entity.LastUpdateDate = DateTime.Now;

            return(_nonQueryDataService.Create(entity));
        }
示例#7
0
        public Task <Student> Create(Student entity)
        {
            entity.IsActive  = true;
            entity.CreatedAt = DateTime.Now;
            entity.CreatedBy = 1;
            entity.FaceAdded = false;
            entity.UpdatedAt = DateTime.Now;

            return(_nonQueryDataService.Create(entity));
        }
示例#8
0
        public async Task <User> Create(User entity)
        {
            string hashedPassword = _passwordHasher.HashPassword(entity.Password);

            entity.Password  = hashedPassword;
            entity.IsActive  = true;
            entity.CreatedAt = DateTime.Now;
            entity.UpdatedAt = DateTime.Now;

            return(await _nonQueryDataService.Create(entity));
        }
示例#9
0
        public async Task <Car> Create(Car entity)
        {
            var results = new List <ValidationResult>();
            var context = new ValidationContext(entity);

            StringBuilder errorResult = new StringBuilder();

            if (!Validator.TryValidateObject(entity, context, results, true))
            {
                foreach (var error in results)
                {
                    errorResult.Append(error.ErrorMessage + '\n');
                }
                throw new Exception(errorResult.ToString());
            }

            return(await _nonQueryDataService.Create(entity));
        }
示例#10
0
        public async Task <Section> AddLecturer(Lecturer lecturer, Course course)
        {
            AttendProcess attenProcess = new AttendProcess
            {
                LastUpdated = DateTime.Now,
                CreatedAt   = DateTime.Now,
                CreatedBy   = 1,
                IsActive    = true,
            };

            Section section = new Section
            {
                CourseId      = course.Id,
                LecturerId    = lecturer.Id,
                CreatedAt     = DateTime.Now,
                CreatedBy     = 1,
                IsActive      = true,
                AttendProcess = attenProcess,
            };

            return(await _nonQuerySectionData.Create(section));
        }
 public async Task <User> Create(User entity)
 {
     return(await _nonQueryDataService.Create(entity));
 }
示例#12
0
 public async Task <Address> Create(Address entity)
 {
     return(await _nonQueryDataService.Create(entity));
 }
示例#13
0
 public Venue Insert(Venue entity)
 {
     return(_nonQueryDataService
            .Create(entity).Result);
 }
示例#14
0
 public async Task <Course> Create(Course entity)
 {
     return(await _nonQueryDataService.Create(entity));
 }
示例#15
0
 public async Task <Account> Create(Account entity)
 {
     return(await _nonQueryDataService.Create(entity));
 }
示例#16
0
 public async Task <T> Create(T entity)
 {
     return(await nonQueryDataService.Create(entity));
 }
示例#17
0
 public async Task <Booking> Create(Booking entity)
 {
     return(await nonQueryDataService.Create(entity));
 }
示例#18
0
 public async Task <Issue> Create(Issue entity)
 {
     return(await _nonQueryDataService.Create(entity));
 }
 public Task <Attendance> Create(Attendance entity)
 {
     return(_nonQueryDataService.Create(entity));
 }
示例#20
0
 public async Task <Color> Create(Color entity) => await _nonQueryDataService.Create(entity);
 public async Task <Specialization> Create(Specialization entity)
 {
     return(await _nonQueryDataService.Create(entity));
 }
 public async Task <Category> Create(Category entity)
 {
     return(await nonQueryDataService.Create(entity));
 }
 public async Task <Consultation> Create(Consultation entity)
 {
     return(await _nonQueryDataService.Create(entity));
 }
示例#24
0
 public async Task <Part> Create(Part entity)
 {
     return(await _nonQueryDataService.Create(entity));
 }
示例#25
0
 public async Task <User> Create(User entity) => await _nonQueryDataService.Create(entity);
示例#26
0
 public async Task <Doctor> Create(Doctor entity)
 {
     return(await _nonQueryDataService.Create(entity));
 }
示例#27
0
 public async Task <Reservation> Create(Reservation entity)
 {
     return(await _nonQueryDataService.Create(entity));
 }
 public Task <Lecturer> Create(Lecturer entity)
 {
     return(_nonQueryDataService.Create(entity));
 }
示例#29
0
 public async Task <Schedule> Create(Schedule entity)
 {
     return(await _scheduleNonQueryDataService.Create(entity));
 }