Beispiel #1
0
 public Task <DataStorageResult <CustomerAppointmentDataModel> > UpdateCustomerAppointmentAsync([ParameterDocumentation("Το ραντεβού πελάτη")] CustomerAppointmentDataModel model)
 => UpdateAsync(x => x.CustomerAppointmets, x => x.Id == model.Id, x =>
 {
     x.DateStart = model.DateStart;
     x.DateEnd   = model.DateEnd;
     x.Note      = model.Note;
 });
Beispiel #2
0
        public async Task <DataStorageResult <CustomerAppointmentDataModel> > AddCustomerAppointmentAsync([ParameterDocumentation("Το ραντεβού πελάτη")] CustomerAppointmentDataModel model)
        {
            try
            {
                DbContext.CustomerAppointmets.Add(model);

                await DbContext.SaveChangesAsync();

                return(await DbContext.CustomerAppointmets.Include(x => x.Customer).Include(x => x.StaffMember).FirstAsync(x => x.Id == model.Id));
            }
            catch (Exception ex)
            {
                return(ex);
            }
        }