Example #1
0
        public static MongoDentalIssueDTO ToDto(this IDentalIssue obj, int odontogramEntryId)
        {
            if (obj == null)
            {
                throw new System.ArgumentNullException(nameof(obj));
            }

            DentalIssueType issueType = DentalIssueType.Cavity;

            if (obj is Cavity)
            {
                issueType = DentalIssueType.Cavity;
            }
            else if (obj is Restoration)
            {
                issueType = DentalIssueType.Restoration;
            }

            return(new MongoDentalIssueDTO()
            {
                Id = obj.Id,
                X = obj.Shape.Position.X,
                Y = obj.Shape.Position.Y,
                IssueType = issueType,
                OdontogramEntryId = odontogramEntryId
            });
        }
 public void AddOdontogramEntryIssue(int entryId, IDentalIssue issue)
 {
     issuesCollection.InsertOne(issue.ToDto(entryId));
 }
Example #3
0
 public void AddOdontogramEntryIssue(int entryId, IDentalIssue issue)
 {
     throw new NotImplementedException();
 }