예제 #1
0
        public async Task <CodificationEntity> GetCodification(int?id)
        {
            CodificationEntity code = await _dataContext.Codifications
                                      .FirstOrDefaultAsync(c => c.Id == id);

            return(code);
        }
예제 #2
0
        public async Task <bool> AddCode(CodificationEntity codification)
        {
            if (codification == null)
            {
                return(false);
            }
            _dataContext.Add(codification);
            await _dataContext.SaveChangesAsync();

            return(true);
        }