Exemple #1
0
        public async Task <Guid> AddEquipment(Equipment model)
        {
            Guid id = Guid.Empty;

            try
            {
                model.Id = Guid.NewGuid();
                await _context.AddAsync <Equipment>(model);

                await _context.SaveChangesAsync();

                id = model.Id;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(id);
        }